/**
 * 
 */
package kr.co.insoft.publicmesh.controller.rest;

import java.util.List;

import kr.co.insoft.core.model.configration.cdt.CDTEntityModel;
import kr.co.insoft.core.service.configration.cdt.CDTService;
import kr.co.insoft.framework.exceptions.ServiceException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author IN-SOFT Inc. GoodwillDD(sylee@in-soft.co.kr)
 *
 */
@RestController
@RequestMapping(value = "rest/cdt", method = RequestMethod.GET, produces = {
		"application/xml", "application/json" })
@ResponseStatus(HttpStatus.OK)
public class RestCDTController {

	@Autowired
	CDTService cdtService;
	
	@RequestMapping(value = "getCdts")
	public List<CDTEntityModel> getCDTs() throws Exception {
		try {
			return cdtService.getCDTs();	
		} catch (ServiceException e) {
			return null;
		}
		
	}
}
